package com.cfec.ipoth_service.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * 面部表情情绪分析表，通过微表情识别情绪状态
 * @TableName facial_analysis
 */
@TableName(value ="facial_analysis")
@Data
public class FacialAnalysis {
    /**
     * 面部分析记录ID
     */
    @TableId(type = IdType.AUTO)
    private Long facialId;

    /**
     * 关联的老人ID
     */
    private Long olderId;

    /**
     * 静态图像存储路径
     */
    private String imagePath;

    /**
     * 视频片段存储路径
     */
    private String videoPath;

    /**
     * 快乐情绪得分
     */
    private BigDecimal happinessScore;

    /**
     * 悲伤情绪得分
     */
    private BigDecimal sadnessScore;

    /**
     * 愤怒情绪得分
     */
    private BigDecimal angerScore;

    /**
     * 惊讶情绪得分
     */
    private BigDecimal surpriseScore;

    /**
     * 恐惧情绪得分
     */
    private BigDecimal fearScore;

    /**
     * 厌恶情绪得分
     */
    private BigDecimal disgustScore;

    /**
     * 中性情绪得分
     */
    private BigDecimal neutralScore;

    /**
     * 主导情绪类型
     */
    private String dominantEmotion;

    /**
     * 分析置信度:预测结果可靠性或确定性
     */
    private BigDecimal confidenceScore;

    /**
     * 分析时间
     */
    private Date analysisTime;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新时间
     */
    private Date updateTime;

    /**
     * 1使用，0弃用
     */
    private Long facialStatus;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        FacialAnalysis other = (FacialAnalysis) that;
        return (this.getFacialId() == null ? other.getFacialId() == null : this.getFacialId().equals(other.getFacialId()))
            && (this.getOlderId() == null ? other.getOlderId() == null : this.getOlderId().equals(other.getOlderId()))
            && (this.getImagePath() == null ? other.getImagePath() == null : this.getImagePath().equals(other.getImagePath()))
            && (this.getVideoPath() == null ? other.getVideoPath() == null : this.getVideoPath().equals(other.getVideoPath()))
            && (this.getHappinessScore() == null ? other.getHappinessScore() == null : this.getHappinessScore().equals(other.getHappinessScore()))
            && (this.getSadnessScore() == null ? other.getSadnessScore() == null : this.getSadnessScore().equals(other.getSadnessScore()))
            && (this.getAngerScore() == null ? other.getAngerScore() == null : this.getAngerScore().equals(other.getAngerScore()))
            && (this.getSurpriseScore() == null ? other.getSurpriseScore() == null : this.getSurpriseScore().equals(other.getSurpriseScore()))
            && (this.getFearScore() == null ? other.getFearScore() == null : this.getFearScore().equals(other.getFearScore()))
            && (this.getDisgustScore() == null ? other.getDisgustScore() == null : this.getDisgustScore().equals(other.getDisgustScore()))
            && (this.getNeutralScore() == null ? other.getNeutralScore() == null : this.getNeutralScore().equals(other.getNeutralScore()))
            && (this.getDominantEmotion() == null ? other.getDominantEmotion() == null : this.getDominantEmotion().equals(other.getDominantEmotion()))
            && (this.getConfidenceScore() == null ? other.getConfidenceScore() == null : this.getConfidenceScore().equals(other.getConfidenceScore()))
            && (this.getAnalysisTime() == null ? other.getAnalysisTime() == null : this.getAnalysisTime().equals(other.getAnalysisTime()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getFacialStatus() == null ? other.getFacialStatus() == null : this.getFacialStatus().equals(other.getFacialStatus()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getFacialId() == null) ? 0 : getFacialId().hashCode());
        result = prime * result + ((getOlderId() == null) ? 0 : getOlderId().hashCode());
        result = prime * result + ((getImagePath() == null) ? 0 : getImagePath().hashCode());
        result = prime * result + ((getVideoPath() == null) ? 0 : getVideoPath().hashCode());
        result = prime * result + ((getHappinessScore() == null) ? 0 : getHappinessScore().hashCode());
        result = prime * result + ((getSadnessScore() == null) ? 0 : getSadnessScore().hashCode());
        result = prime * result + ((getAngerScore() == null) ? 0 : getAngerScore().hashCode());
        result = prime * result + ((getSurpriseScore() == null) ? 0 : getSurpriseScore().hashCode());
        result = prime * result + ((getFearScore() == null) ? 0 : getFearScore().hashCode());
        result = prime * result + ((getDisgustScore() == null) ? 0 : getDisgustScore().hashCode());
        result = prime * result + ((getNeutralScore() == null) ? 0 : getNeutralScore().hashCode());
        result = prime * result + ((getDominantEmotion() == null) ? 0 : getDominantEmotion().hashCode());
        result = prime * result + ((getConfidenceScore() == null) ? 0 : getConfidenceScore().hashCode());
        result = prime * result + ((getAnalysisTime() == null) ? 0 : getAnalysisTime().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getFacialStatus() == null) ? 0 : getFacialStatus().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", facialId=").append(facialId);
        sb.append(", olderId=").append(olderId);
        sb.append(", imagePath=").append(imagePath);
        sb.append(", videoPath=").append(videoPath);
        sb.append(", happinessScore=").append(happinessScore);
        sb.append(", sadnessScore=").append(sadnessScore);
        sb.append(", angerScore=").append(angerScore);
        sb.append(", surpriseScore=").append(surpriseScore);
        sb.append(", fearScore=").append(fearScore);
        sb.append(", disgustScore=").append(disgustScore);
        sb.append(", neutralScore=").append(neutralScore);
        sb.append(", dominantEmotion=").append(dominantEmotion);
        sb.append(", confidenceScore=").append(confidenceScore);
        sb.append(", analysisTime=").append(analysisTime);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", facialStatus=").append(facialStatus);
        sb.append("]");
        return sb.toString();
    }
}